home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / SRC / GEMLIB38.LZH / a_shel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-10  |  2.7 KB  |  137 lines

  1. /*
  2.  *    Aes shel library interface
  3.  *
  4.  *    ++jrb    bammi@cadence.com
  5.  *    modified: mj -- ntomczak@vm.ucs.ualberta.ca
  6.  * modified: cf -- felsch@tu-harburg.de
  7.  */
  8. #include "gem.h"
  9.  
  10.  
  11. int shel_envrn(char **result, char *param)
  12. {
  13.     aes_addrin[0] = (long)result;
  14.     aes_addrin[1] = (long)param;
  15.    aes_control[0] = 125;
  16.    aes_control[1] = 0;
  17.    aes_control[2] = 1;
  18.    aes_control[3] = 2;
  19.    aes_control[4] = 0;
  20.    aes(&aes_params);
  21.     return aes_intout[0];
  22. }
  23.  
  24.  
  25. int shel_find(char *buf)
  26. {
  27.     aes_addrin[0] = (long)buf;
  28.    aes_control[0] = 124;
  29.    aes_control[1] = 0;
  30.    aes_control[2] = 1;
  31.    aes_control[3] = 1;
  32.    aes_control[4] = 0;
  33.    aes(&aes_params);
  34.     return aes_intout[0];
  35. }
  36.  
  37.  
  38. int shel_get(char *Buf, int Len)
  39. {
  40.     aes_intin[0] = Len;
  41.     aes_addrin[0] = (long)Buf;
  42.    aes_control[0] = 122;
  43.    aes_control[1] = 1;
  44.    aes_control[2] = 1;
  45.    aes_control[3] = 1;
  46.    aes_control[4] = 0;
  47.    aes(&aes_params);
  48.     return aes_intout[0];
  49. }
  50.  
  51.  
  52. int shel_help(int sh_hmode, char *sh_hfile, char *sh_hkey)
  53. {
  54.     aes_intin[0] = sh_hmode;
  55.     aes_addrin[0] = (long)sh_hfile;
  56.     aes_addrin[1] = (long)sh_hkey;
  57.    aes_control[0] = 128;
  58.    aes_control[1] = 1;
  59.    aes_control[2] = 1;
  60.    aes_control[3] = 2;
  61.    aes_control[4] = 0;
  62.    aes(&aes_params);
  63.     return aes_intout[0];
  64. }
  65.  
  66.  
  67. int shel_put(char *Buf, int Len)
  68. {
  69.     aes_intin[0] = Len;
  70.     aes_addrin[0] = (long)Buf;
  71.    aes_control[0] = 123;
  72.    aes_control[1] = 1;
  73.    aes_control[2] = 1;
  74.    aes_control[3] = 1;
  75.    aes_control[4] = 0;
  76.    aes(&aes_params);
  77.     return aes_intout[0];
  78. }
  79.  
  80.  
  81. int shel_rdef(char *lpcmd, char *lpdir)
  82. {
  83.     aes_addrin[0] = (long)lpcmd;
  84.     aes_addrin[1] = (long)lpdir;
  85.    aes_control[0] = 126;
  86.    aes_control[1] = 0;
  87.    aes_control[2] = 1;
  88.    aes_control[3] = 2;
  89.    aes_control[4] = 0;
  90.    aes(&aes_params);
  91.     return aes_intout[0];
  92. }
  93.  
  94.  
  95. int shel_read(char *Command, char *Tail)
  96. {
  97.     aes_addrin[0] = (long)Command;
  98.     aes_addrin[1] = (long)Tail;
  99.    aes_control[0] = 120;
  100.    aes_control[1] = 0;
  101.    aes_control[2] = 1;
  102.    aes_control[3] = 2;
  103.    aes_control[4] = 0;
  104.    aes(&aes_params);
  105.     return aes_intout[0];
  106. }
  107.  
  108. int shel_wdef(char *lpcmd, char *lpdir)
  109. {
  110.     aes_addrin[0] = (long)lpcmd;
  111.     aes_addrin[1] = (long)lpdir;
  112.    aes_control[0] = 127;
  113.    aes_control[1] = 0;
  114.    aes_control[2] = 1;
  115.    aes_control[3] = 2;
  116.    aes_control[4] = 0;
  117.    aes(&aes_params);
  118.     return aes_intout[0];
  119. }
  120.  
  121.  
  122. int shel_write(int wodex, int wisgr, int wiscr, void *cmd, char *tail)
  123. {
  124.     aes_intin[0] = wodex;
  125.     aes_intin[1] = wisgr;
  126.     aes_intin[2] = wiscr;
  127.     aes_addrin[0] = (long)cmd;
  128.     aes_addrin[1] = (long)tail;
  129.    aes_control[0] = 121;
  130.    aes_control[1] = 3;
  131.    aes_control[2] = 1;
  132.    aes_control[3] = 2;
  133.    aes_control[4] = 0;
  134.    aes(&aes_params);
  135.     return aes_intout[0];
  136. }
  137.